package tnp.modules;

import tnp.util.QualifyInterceptor;
import tnp.util.MethodMatcher;
import tnp.service.*;

import com.google.inject.AbstractModule;
import com.google.inject.Scopes;
import com.google.inject.matcher.Matchers;

public class ServiceModule extends AbstractModule {

	@Override
	protected void configure() {
		bind(CommonService.class).to(CommonServiceImpl.class).in(Scopes.SINGLETON);
		bindInterceptor(Matchers.subclassesOf(CommonService.class), new MethodMatcher(), new QualifyInterceptor());

	}

}
